package com.ruoyi.dev.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dev.mapper.DevDatavBlockMapper;
import com.ruoyi.dev.domain.DevDatavBlock;
import com.ruoyi.dev.service.IDevDatavBlockService;

/**
 * 大屏版块Service业务层处理
 * 
 * @author yepanpan
 * @date 2025-02-25
 */
@Service
public class DevDatavBlockServiceImpl implements IDevDatavBlockService 
{
    private static final Logger log = LoggerFactory.getLogger(DevDatavBlockServiceImpl.class);

    @Autowired
    private DevDatavBlockMapper devDatavBlockMapper;

    /**
     * 查询大屏版块
     * 
     * @param id 大屏版块主键
     * @return 大屏版块
     */
    @Override
    public DevDatavBlock selectDevDatavBlockById(Long id)
    {
        return devDatavBlockMapper.selectDevDatavBlockById(id);
    }

    /**
     * 查询大屏版块列表
     * 
     * @param devDatavBlock 大屏版块
     * @return 大屏版块
     */
    @Override
    public List<DevDatavBlock> selectDevDatavBlockList(DevDatavBlock devDatavBlock)
    {
        return devDatavBlockMapper.selectDevDatavBlockList(devDatavBlock);
    }

    /**
     * 新增大屏版块
     * 
     * @param devDatavBlock 大屏版块
     * @return 结果
     */
    @Override
    public int insertDevDatavBlock(DevDatavBlock devDatavBlock)
    {
        devDatavBlock.setCreateTime(DateUtils.getNowDate());
        return devDatavBlockMapper.insertDevDatavBlock(devDatavBlock);
    }

    /**
     * 修改大屏版块
     * 
     * @param devDatavBlock 大屏版块
     * @return 结果
     */
    @Override
    public int updateDevDatavBlock(DevDatavBlock devDatavBlock)
    {
        devDatavBlock.setUpdateTime(DateUtils.getNowDate());
        return devDatavBlockMapper.updateDevDatavBlock(devDatavBlock);
    }

    /**
     * 批量删除大屏版块
     * 
     * @param ids 需要删除的大屏版块主键
     * @return 结果
     */
    @Override
    public int deleteDevDatavBlockByIds(Long[] ids)
    {
        return devDatavBlockMapper.deleteDevDatavBlockByIds(ids);
    }

    /**
     * 删除大屏版块信息
     * 
     * @param id 大屏版块主键
     * @return 结果
     */
    @Override
    public int deleteDevDatavBlockById(Long id)
    {
        return devDatavBlockMapper.deleteDevDatavBlockById(id);
    }


}
